﻿<div class="row">
    <div class="col-sm-3  bg-primary">
        <div id="sample-table-2_length" class="dataTables_length">
            <label>酒店名称: <input type="text" id="title" aria-controls="sample-table-2"></label>
        </div>
    </div>

    <div class="col-sm-3">
        <button type="button" id="btnSearch" class="btn btn-purple btn-sm">
            Search
            <i class="icon-search icon-on-right bigger-110"></i>
        </button>
        <a class="btn btn-warning btn-sm " href="/Hotel/add"><i class="icon-plus-sign bigger-120"></i>新增</a>
    </div>
</div>
<script>
    $("#btnSearch").click(function () {
        var con = new condition();
        $.btnClick({
            url: "/Hotel/Search",
            data: { pname: con.title }
        })
    });

    function condition() {
        this.title = $("#title").val();
        return this;
    }

    function to_page(pageIndex) {
        var con = new condition();
        $.btnClick({
            url: "/Hotel/Search",
            data: { pname: con.title, pageIndex: pageIndex }
        })
    }
</script>